<template>
  <div class="context war">
    <div class="area-center bold-size m-t-20">
      <div class="xi title-center">
        <div class="yuan">{{ $route.query.titleIndex }}</div>
        <div class="zho">
          {{ $route.query.title }}
        </div>
      </div>
      <div class="bottom m-t-10">
        <div class="small">
          <div class="title-center m-t-07">{{ list.coffeeproType }}</div>
          <div class="text m-t-07">
            {{ list.coffeeproTitle }}
          </div>
        </div>
      </div>
      <!-- 内容区域 -->
      <div class="characters richText" v-html="contect"></div>
    </div>
  </div>
</template>
 
 <script>
import { getCoffeeProById } from "@/api/index";
export default {
  data() {
    return {
      list: "",
      contect: "", //内容
    };
  },
  mounted() {
    getCoffeeProById({
      coffeeproId: this.$route.query.id,
    }).then((res) => {
      if (res.data.code == 200) {
        // console.log(res.data.data);
        this.list = res.data.data;
        this.contect = this.dataHTML(res.data.data.coffeeproText);
      }
    });
  },
};
</script>
 
 <style scoped>
.center {
  width: 98%;
}
.area-center{
  overflow-x: hidden;
}
.xi {
  width: 100%;
  margin-top: 0.05rem;
  display: flex;
}
.xi .yuan {
  width: 0.16rem;
  height: 0.16rem;
  text-align: center;
  line-height: 0.16rem;
  border-radius: 50%;
  margin-top: 0.05rem;
  border: 1px solid black;
}

/* 中间区域 */
.xi .zho {
  height: 100%;
  line-height: 0.3rem;
  padding-left: 0.05rem;
}
/* 内容区域 */
.characters {
  width: 100%;

  word-wrap: break-word;
  text-indent: 0.2rem;
}
.bottom {
  width: 100%;
  min-height: 0.3rem;
}
</style>